﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using DWF.Studio.ScriptEngine.IPC.Msg;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DWF.Studio.ScriptEngine
{
    /// <summary>
    /// 引擎ipc服务
    /// </summary>
    public interface IScriptEngineIPCService
    {
        string GetPipeName();

        /// <summary>
        /// 发送下行消息
        /// </summary>
        /// <param name="msg"></param>
        void Send(DownwardMsg msg);

        /// <summary>
        /// 添加上行消息相应事件
        /// </summary>
        /// <param name="action"></param>
        void AddReceiveAction(Action<UpwardMsg> action);

        /// <summary>
        /// 移除上行消息相应事件
        /// </summary>
        /// <param name="action"></param>
        void RemoveReceiveAction(Action<UpwardMsg> action);
    }
}
